import React, { Component } from "react";
// layout组件
import SiderDemo from "../../layouts/index"

class Index extends Component {
    constructor(props){
        super(props);
        this.state = {
            collapsed: false
        };
    }

    componentDidMount(){
        const collapsed = JSON.parse(sessionStorage.getItem("collapsed"));
        this.setState({ collapsed });
    }

    toggleCollapsed = () => {
        const collapsed = !this.state.collapsed;
        this.setState({ collapsed });
        sessionStorage.setItem("collapsed", collapsed);
    }

    render(){
        return (
            <SiderDemo></SiderDemo>
        )
    }
}

export default Index;